package ar.com.vates.ejercicio2;
import java.util.Random;

public class Borra extends Thread{

	private Contenedor contenedor;
	
	public Borra(Contenedor c){
		this.contenedor = c;
	}
	public void run(){
		Random x = new Random();
		for(int i=0 ; i<10; i++){
			contenedor.deleteNumber();
			try{
				sleep(1000 * (x.nextInt(10)+1));
			}catch(InterruptedException e){
				
			}
		}
	}
	public String toString(){
		return "HiloBorra";
	}


}
